ok...then what should i do? If i go back to delete [] then NULL, i'll get the error. Is there something i need to do to the pointer before i delete it that will help. Basically szBuffer points to 256 bytes of memory that hold the results of the windows api function ReadFile(). Currently in the arguments to ReadFile, i tell it to use the szBuffer pointer, and read in 256 bytes. Now all this is in a loop (not the delete part) and the loop runs through each file in a directory, reading 256 bytes of info. Could that be it?